<ul id="elements">
<?php 
foreach ($this->eltsG as $group => $elts): ?>
    <li class="home-group-title"><?php echo $group ?></li>
    <?php foreach($elts as $elt): ?>
    <li>
        <a href="<?php echo $this->url(array("id" => $elt->id()), "viewelement", true) ?>">
        <img class="preview" src="<?php echo $elt->get_image_uri()?>" alt="preview" />
        <span class="name"><?php echo substr($elt->name(), 0, 56).'...' ?></span>
        </a>
    </li>
    <?php endforeach ?>
<?php endforeach ?>
</ul>